// Fill out your copyright notice in the Description page of Project Settings.


#include "SElectAssetRow.h"
#include "SlateOptMacros.h"
#include "Widgets/Text/STextBlock.h"

const FName SElectAssetRow::Col_AssetName(TEXT("AssetName"));

BEGIN_SLATE_FUNCTION_BUILD_OPTIMIZATION
void SElectAssetRow::Construct(const FArguments& InArgs, SElectAssetsView* InElectAssetsView)
{
	ElectAssetsView = InElectAssetsView;
	AssetName = InArgs._AssetName;
	SMultiColumnTableRow<TSharedPtr<FName> >::Construct(FSuperRowType::FArguments(), InArgs._OwnerTableView.ToSharedRef());
}

TSharedRef<SWidget> SElectAssetRow::GenerateWidgetForColumn(const FName& ColumnName)
{
	if (ColumnName.IsEqual(Col_AssetName))
	{
		return SNew(STextBlock)
			.Text(FText::FromName(*AssetName));
	}
	return SNullWidget::NullWidget;
}

END_SLATE_FUNCTION_BUILD_OPTIMIZATION



